<template>
  <div>
    <div class="orderzhu"  v-for="(item,index) in orderData" :key="index">
      <div class="orderwen">
        <div class="orderzuo">
          <p>
             {{item.Info}} | 订单号：{{item.ONumber}} | 在线支付
          </p>
        </div>
        <div class="orderyou">
          <p>应付金额：{{item.TotalPrice}}元</p>
        </div>
      </div>
        <div class="ordertuwen" v-for="(items,indexs) in item.ordersModels" :key="indexs"><img :src="items.GImg" width="20px" height="20px">
        {{items.GName}}</div> 
        <!-- <div>
          <el-table
      ref="multipleTable"
      :data="orderData"
      tooltip-effect="dark"
      style="width: 100%"
    >

      <el-table-column>
        <template slot-scope="scope"
          ><img :src="scope.row.GImg" style="width:80px"
        /></template>
      </el-table-column>

      <el-table-column prop="GName">
      </el-table-column>

    </el-table>
        </div> -->
        <div class="orderstatus"><button>{{item.OStatus==0?"未支付":"已支付"}}</button></div> 
    </div>
  <div class="orderwei">
    <!-- <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="pageindex"
      :page-sizes="[1, 3, 5, 10]"
      :page-size="pagesize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="totalcount">
    </el-pagination> -->
  </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      orderData: [],
      totalcount: 0,
      pageindex: 1,
      pagesize: 3,
      bb:{
        money:""
      },
      qian:'999'
    }
  },
  methods: {
    show() {
      // this.$axios
      //   .get("http://localhost:20338/api/Orders/Show", {
      //     params: {
      //       pageindex: this.pageindex,
      //       pagesize: this.pagesize,
      //     },
      //   })
      //   .then((res) => {
      //     this.orderData = res.data.list;
      //     this.totalcount = res.data.totalcount;
      //   });
      this.$axios.get('http://localhost:20338/api/Orders/ShowOrders').then(res=>{
        this.orderData=res.data;
        console.log(this.orderData);
      })
    },
    // tiao()
    // {
    //   this.$router.push('/money')
    // },
    // handleSizeChange(val) {
    //   this.pagesize=val;
    //   this.show();
    //     console.log(`每页 ${val} 条`);
    //   },
    //   handleCurrentChange(val) {
    //     this.pageindex=val;
    //     this.show();
    //     console.log(`当前页: ${val}`);
    //   }
  },
  created() {
    this.show();
  },
};
</script>

<style scoped>
.orderzhu {
  width: 1000px;
  height: 300px;
  border: 1px solid #ccc;
  margin: auto;
  margin-top: 50px;
}
.orderwen {
  width: 1000px;
  height: 100px;
}
.orderzuo {
  padding: 10px 20px 10px 20px;
  width: 600px;
  text-align: left;
  float: left;
}
.orderyou {
  padding: 10px 20px 10px 20px;
  width: 300px;
  text-align: right;
  margin-left: 650px;
}
.ordertuwen{
  text-align: left;
  margin-left: 20px;
  width: 600px;
  float: left;
}
.orderstatus{
  text-align: right;
  margin-right: 20px;
  color: red;
  margin-top: 5px;
}
.orderwei{
  width: 1000px;
  height: 50px;
  margin: auto;
  text-align: right;
}
</style>